//
//  TSCMyDBUtil.h
//  Tsc_IOS
//
//  Created by Rio on 15-5-6.
//  Copyright (c) 2015年 idream. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "TSCSDK.h"
#import "TSCJsonGC.h"
#import "TSCJsonMsg.h"
#import "TSCJsonUser.h"

@interface TSCMyDBUtil : NSObject

+ (void) updateSysConfigValueWithKey_1:(NSString *)key value:(NSString *)value;
+ (NSDictionary *) getSysConfigValueBatch_1:(NSArray *)keysArr;

+ (void) updateGoodsClassWithVersionNum_1:(NSInteger)dbVerGoodsClassSer gcArray:(NSArray*)gcArray;

+ (void) updateCityWithVersionNum_1:(NSInteger)dbVersionCity cityArray:(NSArray *)cityArray;

+ (void) insertOrUpdateUserWithId_1:(NSInteger)id name:(NSString *)name email:(NSString *)email picUrl:(NSString *)picUrl;

+ (NSDictionary *) getRUserWithNameOrEmail_1:(NSString *)nameOrEmail;
+ (TSCJsonUser *) getRUserWithUserId_1:(NSInteger)userId;
+ (NSString *) getAllAvailableGCIds_1:(NSString *)availableGCIds;
+ (void) getSpIdxGCId2DArr_1:(NSInteger[3][3])spIdxGCId2DArr gcIds:(NSString *)gcIds;
+ (NSArray *) getSpIdxGC2DArr_1:(NSString *)gcIds;
+ (NSArray *) getGoodsClassAllChildrenInUse_1:(NSInteger)pid availableGCIds:(NSString *)availableGCIds;
+ (NSArray *) getGoodsClassTopLevelInUse_1:(NSString *)availableGCIds;
+ (TSCJsonGC *) getGC_1:(NSInteger) gcId;

+ (NSInteger)getUnreadMsgNumWithUserId_1:(NSInteger)userId types:(NSString *)types isReaded:(NSInteger)isReaded;
+ (TSCJsonMsg *) getUnreadMsgWithUserId_1:(NSInteger)userId type:(NSInteger)type msgId:(NSInteger)msgId;
+ (NSArray *)getUnreadMsgListWithUserId_1:(NSInteger)userId types:(NSString *)types lastMsgId:(NSInteger)lastMsgId senderName:(NSString *)senderName createDateStr:(NSString *)createDateStr isReaded:(NSInteger)isReaded isFavorite:(NSInteger)isFavorite;
+ (BOOL) insertUnreadMsgWithUserId_1:(NSInteger)userId msgType:(NSInteger)msgType msgId:(NSInteger)msgId si:(NSInteger)si sn:(NSString *)sn spu:(NSString *)spu info:(NSString *)info ct:(NSInteger)ct isReaded:(NSInteger)isReaded isFavorited:(NSInteger)isFavorited;
+ (void) deleteAllUnreadMsgWithUserId_1:(NSInteger)userId;
+ (void) deleteUnreadMsgWithMsgId_1:(NSInteger)msgId;
+ (void) markUnreadMsgReadedWithMsgId_1:(NSInteger)msgId;
+ (void) markUnreadMsgFavoritedWithMsgId_1:(NSInteger)msgId isFavorited:(NSInteger)isFavorited;

@end
